package com.ly.dingtalk.component.application;

import org.springframework.beans.factory.SmartInitializingSingleton;

import com.ly.dingtalk.component.factory.app.DingAppFactory;


/**
 * 钉钉应用
 * 整个项目基于Spring容器能力，所以最好将APP实现注册到IoC容器中
 *
 * @author wangzhen
 */
public interface IDingApp extends IDingCorp, SmartInitializingSingleton {

    String getAppName();
    // RobotCode 和 appKey是一样的
    String getAppKey();

    String getAppSecret();

    String getAppId();
    
    Long getAgentId();

    @Override
    default void afterSingletonsInstantiated() {
        DingAppFactory.setAppCache(this);
    }
}
